<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/warehouseoutintodtos/WarehouseoutintoDTO.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/system/warehouseoutintodtos/WarehouseoutintoDTO.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'WarehouseoutintoDTOid',
                footer: "Foots",
                cnName: '出库订单表',
                name: 'warehouseoutintodtos/WarehouseoutintoDTO',
                url: "/WarehouseoutintoDTO/",
                sortName: "WarehouseoutintoDTOid"
            });
            const editFormFields = ref({"WarehouseoutId":"","WarehouseoutType":"","OrderId":"","SupplierNumber":"","SupplierName":"","SupplierPeople":"","Remark":"","ProductName":"","ProductCode":"","ProductSKU":"","Batch":"","Price":"","WarehouseinNumber":"","SumPrice":"","WarehouseLocationId":""});
            const editFormOptions = ref([[{"title":"出库单号","field":"WarehouseoutId"},
                               {"dataKey":"出库类型","data":[],"title":"出库单类型","field":"WarehouseoutType"}],
                              [{"title":"关联订单号","field":"OrderId"},
                               {"title":"供应商编号","field":"SupplierNumber"}],
                              [{"title":"供应商名称","field":"SupplierName"},
                               {"title":"供应商联系人","field":"SupplierPeople"}],
                              [{"title":"备注","field":"Remark"},
                               {"title":"产品名称","field":"ProductName"}],
                              [{"title":"产品编码","field":"ProductCode"},
                               {"title":"规格","field":"ProductSKU"}],
                              [{"title":"批次","field":"Batch"},
                               {"title":"单价","field":"Price","type":"number"}],
                              [{"title":"出库数","field":"WarehouseinNumber","type":"number"},
                               {"title":"总价","field":"SumPrice","type":"decimal"}],
                              [{"title":"库位","field":"WarehouseLocationId"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:'WarehouseoutId',title:'出库单号',type:'string',link:true,width:220,align:'left',sort:true},
                       {field:'WarehouseoutType',title:'出库单类型',type:'string',bind:{ key:'出库类型',data:[]},width:220,align:'left'},
                       {field:'OrderId',title:'关联订单号',type:'string',width:220,align:'left'},
                       {field:'SupplierNumber',title:'供应商编号',type:'string',width:220,align:'left'},
                       {field:'SupplierName',title:'供应商名称',type:'string',width:220,align:'left'},
                       {field:'SupplierPeople',title:'供应商联系人',type:'string',width:220,align:'left'},
                       {field:'SupplierPhone',title:'供应商联系方式',type:'string',width:220,align:'left'},
                       {field:'MakeupPeople',title:'制单人',type:'string',width:220,align:'left'},
                       {field:'MakeupTime',title:'制单时间',type:'datetime',width:220,align:'left',sort:true},
                       {field:'Remark',title:'备注',type:'string',width:220,align:'left'},
                       {field:'ProductId',title:'产品ID',type:'string',width:220,align:'left'},
                       {field:'ProductName',title:'产品名称',type:'string',width:220,align:'left'},
                       {field:'ProductCode',title:'产品编码',type:'string',width:220,align:'left'},
                       {field:'ProductSKU',title:'规格',type:'string',width:220,align:'left'},
                       {field:'Batch',title:'批次',type:'string',width:220,align:'left'},
                       {field:'Price',title:'单价',type:'int',width:220,align:'left'},
                       {field:'WarehouseinNumber',title:'出库数',type:'int',width:220,align:'left'},
                       {field:'SumPrice',title:'总价',type:'decimal',width:220,align:'left'},
                       {field:'WarehouseLocationId',title:'库位',type:'string',width:220,align:'left'},
                       {field:'IsDel',title:'是否删除',type:'int',width:220,align:'left'},
                       {field:'WarehouseoutintoDTOid',title:'出库商品订单号',type:'string',width:120,require:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
